package com.wl.controller;

import com.wl.domain.AjaxResult;
import com.wl.domain.Store;
import com.wl.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/store")
public class StoreController {
    @Autowired
    private StoreService storeService;

    @PostMapping
    public AjaxResult save(@RequestBody Store store){
        storeService.save(store);
        //返回成功
        return AjaxResult.me();
    }

}
